<?php
$config = [
    'components' => [
        'cache' => [
            //缓存配置
            'class' => 'yii\caching\MemCache',
            'servers' => array(
                array(
                    'host' => '8.133.178.113',
                    'port' => 11211,
                )
            )
        ],
        'mongodb'=>[
            'class' => '\yii\mongodb\Connection',
            'dsn'=>'mongodb://8.133.178.113:27017/zzcx'
        ],
        /**数据库配置**/
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=8.133.178.113;dbname=dll',
            'username' => 'spider',
            'password' => 'PjGPWNUgOYe6i1Ef',
            'charset' => 'utf8',
        ],
        //session配置
        'session' => [
            'class' => 'CCacheHttpSession',
            'cookieMode' => 'only',
            'timeout' => 1200
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            'useFileTransport' => true,
        ],

    ],
];

if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
    ];
}

return $config;
